gdk: Fix a variable
authorBenjamin Otte <otte@redhat.com>
Thu, 17 Nov 2016 21:03:04 +0000 (22:03 +0100)
committerBenjamin Otte <otte@redhat.com>
Thu, 17 Nov 2016 21:11:33 +0000 (22:11 +0100)
The passed in surface is the current_paint surface, so I guess this
usage hasn't been noticed.

gdk/gdkgl.c
gdk/x11/gdkglcontext-x11.c

index 2005cec6b198fac6b47544983714812179eb6b01..b62fc2d87aa219bf174a8486e734f512f4459ed5 100644 (file)
@@ -741,10 +741,8 @@ gdk_gl_texture_from_surface (cairo_surface_t *surface,
   gdk_window_get_unscaled_size (window, NULL, &unscaled_window_height);
 
   sx = sy = 1;
-  cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
-
-  cairo_surface_get_device_offset (surface,
-                                   &device_x_offset, &device_y_offset);
+  cairo_surface_get_device_scale (surface, &sx, &sy);
+  cairo_surface_get_device_offset (surface, &device_x_offset, &device_y_offset);
 
   glGenTextures (1, &texture_id);
   if (use_texture_rectangle)
index 5f16bafa921162d824e37c120ddc417c4da9c1a6..77103b50e2f4922ce9ba08e858ee787fcbc52808 100644 (file)
@@ -463,7 +463,7 @@ gdk_x11_gl_context_texture_from_surface (GdkGLContext *paint_context,
   gdk_window_get_unscaled_size (window, NULL, &unscaled_window_height);
 
   sx = sy = 1;
-  cairo_surface_get_device_scale (window->current_paint.surface, &sx, &sy);
+  cairo_surface_get_device_scale (surface, &sx, &sy);
   cairo_surface_get_device_offset (surface, &device_x_offset, &device_y_offset);
 
   /* Ensure all the X stuff are synced before we read it back via texture-from-pixmap */